medieval court background